﻿using System;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class Student_score : StudentPageBase
{
    string starTime = "";//this.starTime.Text.Trim();
    string endTime = "";//this.endTime.Text.Trim();
    string keyword = "";//this.keywordTb.Text.Trim();、

    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack) {
            BindData();
        }
    }
    //获取我还未参加的和考试中的
    private void BindData() {


        int pagesize = AspNetPager1.PageSize;
        int page = AspNetPager1.CurrentPageIndex - 1; //GetPageIndex();
        int size = new Exam.Core.DAL.StudentExamList().getSize(
                isTheMe.StudentID.Trim(),
                starTime,
                endTime,
                keyword);
        AspNetPager1.RecordCount = size;
        List<Exam.Core.Model.StudentExamList> list = new Exam.Core.DAL.StudentExamList().getPaperListByPage(
                isTheMe.StudentID.Trim(),
                pagesize,
                page,
                starTime,
                endTime,
                keyword
            );
        rp.DataSource = list;
        rp.DataBind();
    }
    protected string getstatus(string statu)
    {
        //考试状态 0未开始 1开始考试 2已经交卷 3培训师未判卷 4培训师判卷给分
        if (statu.Trim() == "0") { return "未考"; }
        if (statu.Trim() == "1") { return "<span style='color:#ff0000;'>已考未交卷</span>"; }
        if (statu.Trim() == "2") { return "已交卷"; }
        if (statu.Trim() == "3") { return "培训师未判卷"; }
        if (statu.Trim() == "4") { return "培训师已判卷"; }
        return "";
    }

    protected void AspNetPager1_PageChanged(object sender, EventArgs e) {
        BindData();
    }
}